<%@ page import="javax.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="forms.StudentForm" %>
<%@ page import="forms.DegreeForm" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%
	response.setContentType("text/xml");

	//Get the studentsRowSet
	StudentForm app = (StudentForm) request.getAttribute("app");
	Vector degrees = (Vector) request.getAttribute("degrees");
	DegreeForm degree;
	
	int app_id = (Integer)request.getAttribute("app_id");
	String app_name = "app_" + String.valueOf(app_id);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html xhtml="true">
<body>
	<div id="<%=app_name%>">				
		<p><b><bean:message key="student.application.header" /></b></p>
		<ul class="none">
			<li>
				Name: 
					<%= app.getFname() %>
					<%= app.getMname() %>
					<%= app.getLname() %>
			</li>
			<li>Citizenship: <%= app.getCitizen() %></li>
			<li>Residence: <%= app.getResidence() %></li>
			<li>Address: 
				<%= app.getAddress() %> <%= app.getCity() %>
				<%= app.getState() %>
			</li>
			<li>Telephone: <%= app.getArea_code() %> 
							<%= app.getTelephone() %></li>
			<li>Residency: <%= app.getResidency() %></li>
		</ul>
		<ul class="none">
			<li>Specialization: <%= app.getSpecialization() %></li>
		</ul>
		<ul class="none">
		<li><b>Degrees</b></li>
		<%
			for (int index = 0; index < degrees.size(); index++) {
				
			 degree = (DegreeForm)degrees.get(index);
		%>
		<li>
			Location: <i><%= degree.getLocation() %></i>, 
			University: <i><%= degree.getUniversity() %></i>
		</li>
		<li>
			Major: <i><%= degree.getMajor() %></i>, 
			Graduation: <i><%= degree.getMonth() %></i>/<i><%= degree.getYear() %></i>, 
			GPA: <i><%= degree.getGpa() %></i>, 
			Title: <i><%= degree.getTitle() %></i>
		</li>
		<li>
			Transcript: <i>transcript.pdf</i>
		</li>
		<%
			}
		%>	
		</ul>
	</div>
</body>
</html:html>